package com.rssreader.client.mvc.controllers;

import com.extjs.gxt.ui.client.mvc.AppEvent;
import com.extjs.gxt.ui.client.mvc.Controller;
import com.rssreader.client.mvc.events.AppEvents;
import com.rssreader.client.mvc.views.ItemView;

public class ItemController extends Controller {
    private ItemView itemView;

    public ItemController() {
	registerEventTypes(AppEvents.Init);
	registerEventTypes(AppEvents.ItemSelected);
    }

    @Override
    public void handleEvent(AppEvent event) {
	forwardToView(itemView, event);
    }

    @Override
    protected void initialize() {
	super.initialize();
	itemView = new ItemView(this);
    }
}
